package com.weichen.studentgameexchange.comment.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.weichen.studentgameexchange.common.enums.ReplyDepth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author 惟尘
 * @since 2025-02-05
 */
@Getter
@Setter
@ToString
@TableName("comment_reply")
@Schema(name = "CommentReply对象", description = "")
public class CommentReply implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 唯一标识一条回复
     */
    @Schema(description = "唯一标识一条回复")
    @TableId(value = "reply_id", type = IdType.AUTO)
    private Long replyId;

    /**
     * 回复所属的评论ID，关联论坛帖子表
     */
    @TableField("comment_id")
    @Schema(description = "回复所属的评论ID，关联论坛帖子表")
    private Long commentId;

    /**
     * 回复用户的ID，关联用户信息表
     */
    @TableField("user_id")
    @Schema(description = "回复用户的ID，关联用户信息表")
    private Long userId;
    /**
     * 回复攻略的ID，关联游戏攻略表
     */
    @TableField("strategy_id")
    @Schema(description = "回复攻略的ID，关联游戏攻略表")
    private Long strategyId;

    /**
     * 回复的详细内容
     */
    @TableField("content")
    @Schema(description = "回复的详细内容")
    private String content;

    /**
     * 记录回复发布的时间
     */
    @TableField("reply_time")
    @Schema(description = "记录回复发布的时间")
    private LocalDateTime replyTime;

    /**
     * 这条回复是对哪条回复的回复，关联论坛回复表
     */
    @TableField("parent_reply_id")
    @Schema(description = "这条回复是对哪条回复的回复，关联论坛回复表")
    private Long parentReplyId;

    /**
     * 记录回复被点赞的次数
     */
    @TableField("like_count")
    @Schema(description = "记录回复被点赞的次数")
    private Integer likeCount;

    /**
     * 回复层级(1-直接回复评论 2-回复其他回复)
     */
    @TableField("depth")
    @Schema(description = "回复层级(1-直接回复评论 0-回复其他回复)")
    private ReplyDepth depth;

    /**
     * 回复路径(存储祖先回复ID链)
     */
    @TableField("path")
    @Schema(description = "回复路径(存储祖先回复ID链)")
    private String path;
}
